home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14772 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  975 b 

  1. Path: news.nask.org.pl!usenet
  2. From: flssoft@blue.maloka.waw.pl (Grzegorz (FLS))
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Turbo C++ won't write 0Ah to file!?!?
  5. Date: Mon, 01 Apr 1996 22:22:43 GMT
  6. Organization: Research and Academic Computer Network
  7. Message-ID: <4jph9f$fq9@bilbo.nask.org.pl>
  8. References: <4jnpcg$nis@tribune.concentric.net>
  9. NNTP-Posting-Host: s112.maloka.waw.pl
  10. X-Newsreader: Forte Free Agent v0.46
  11.  
  12. mikolaj@concentric.com wrote:
  13.  
  14. >Turbo C++ 3.0 won't write character 0Ah to a file, instead it writes 0Dh.
  15. >What's the problem? Is this a bug?
  16. >Thanks, Mike.
  17.  
  18. Hi Mikolaj,
  19.  
  20. Try to change a file open mode. 0x0A it is '\n' character. If you are
  21. writing to a text file, '\n' is converted to "\r\n" string.In the
  22. result you will have 0x0D 0x0A characters in the file. Note that the
  23. mode in which is opened the file depends on arguments (const char*
  24. mode), and if you do not give not 't' neither 'b', the mode depends on
  25. _fmode global variable.
  26.  
  27.  
  28. Regards,
  29. Grzegorz.
  30.  
  31.  
  32.